<template>
      <el-dialog
      width="750px"
      :visible="agreementShow"
      :append-to-body="true"
      :show-close="false"
    >
    <div slot="title" class="agree_close">
      <!-- 个人设置 -->
      <div class="title">{{agreement.title}}</div>
      <img src="@/assets/img/icon_gb1.png" class="close" @click="hide" />
    </div>
    <div v-html="agreement.content"></div>
    </el-dialog>
</template>

<script>
import {get_explain} from '@/assets/js/API/info.js';
export default {
  props: {
    agreementShow: Boolean,
  },
  data() {
    return {
      agreement: {}
    }
  },
  mounted() {
    // this.getAgreement();
  },
  methods: {
    async getAgreement(id) {
      const res = await get_explain({
          id: id,
          type: 1,
        });
      if(res.code != 1) return this.$message.error(res.msg);
      this.agreement = res.data;
    },
    hide() {
      this.$emit("close")
    }
  },
}
</script>

<style lang="less">
.agree_close {
  .title {
    float: left;
    font-size: 14px;
  }
  .close {
    float: right;
    height: 18px;
  }
}
</style>